package org.jsola.hr.provider.impl;

import org.jsola.hr.provider.ITokenProviderService;
import org.jsola.user.core.TokenUser;
import org.jsola.user.dto.JwtTokenDTO;
import org.jsola.user.service.ITokenService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author wu
 */
@Service("hrTokenProviderService")
public class TokenProviderServiceImpl implements ITokenProviderService {

    @Autowired
    private ITokenService tokenService;

    @Override
    public TokenUser checkToken(String token) {
        return tokenService.checkToken(token);
    }

    @Override
    public JwtTokenDTO switchToken(String token, String siteId) {
        return tokenService.switchToken(token, siteId);
    }
}
